#!/bin/bash
# filename:running.sh
# 查询 是否含有进程 scrapy_dongchedi_production ，如果存在就杀掉！然后重启
# nohup bash run_sucai999.sh >bashhis.log &

seconds=7200
echo $seconds
while true
do
  echo $i
  str=`ps aux | grep "sucai999" | grep -v grep | awk '{print $2}'`
  echo $str Manager
  `kill -9 $str`
  if [ "$?" -eq 0 ]; then
      echo "kill success"
  else
      echo "kill failed"
  fi

  nohup python  sucai999.py > nohup_down_sucai999.log 2>&1 &
  sleep  ${seconds}
done
